package routers

import (
	"game-hub/handlers"
	"github.com/gin-contrib/cors"
	"github.com/gin-gonic/gin"
)

func Init() *gin.Engine {
	r := gin.Default()
	r.Use(cors.Default())
	r.Static("static", "./static")
	r.POST("/app/appadd", handlers.AppAdd)
	r.POST("/app/appadd", handlers.StateAdd)
	r.GET("/app/applist", handlers.APPList)
	return r
}
